package cn.kgc.mcartoon.controller;


import cn.kgc.mcartoon.dto.ResultJson;
import cn.kgc.mcartoon.entity.MmUsersDO;
import cn.kgc.mcartoon.service.MmUsersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author christopher
 * @since 2021-09-23
 */
@RestController
@RequestMapping("/api/user")
@Api(value = "用户模块")
public class MmUsersController {

    @Autowired
    private MmUsersService usersService;

    @ApiOperation(value = "用户登录")
    @PostMapping("login")
    public ResultJson login(@RequestBody MmUsersDO user){

        return usersService.loginUser(user);
    }



}

